//
//  YD_purchaseCharmsCellA.m
//  SpeedDating
//
//  Created by isu on 16/12/15.
//  Copyright © 2016年 isu. All rights reserved.
//

#import "YD_purchaseCharmsCellA.h"

@implementation YD_purchaseCharmsCellA

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
+(instancetype)cellWithTableView:(UITableView*)tableView {
    static NSString *ID = @"YD_purchaseCharmsCellACell";
    YD_purchaseCharmsCellA *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if(cell==nil){
        cell = [[YD_purchaseCharmsCellA  alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:ID];
        cell.backgroundColor =[UIColor whiteColor];
        cell.selectionStyle = UITableViewCellSelectionStyleNone;
    }
    return cell;
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if(self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]){
        UIView *line = [UIView new];
        line.backgroundColor =[UIColor clearColor];
        [self.contentView addSubview:line];
        [line mas_makeConstraints:^(MASConstraintMaker *make) {
            make.centerY.mas_equalTo(self.contentView);
            make.left.right.mas_equalTo(self.contentView);
            make.height.mas_equalTo(1);
        }];
        
        
        UILabel *lab1= [UILabel new];
        [self.contentView addSubview:lab1];
        [lab1 mas_makeConstraints:^(MASConstraintMaker *make) {
            make.bottom.mas_equalTo(line.mas_top).offset(-2);
            make.left.mas_equalTo(15);
        }];
        lab1.font =[UIFont systemFontOfSize:16.0f];
        lab1.text = @"当前钻石";
        
        UILabel *lab2= [UILabel new];
        [self.contentView addSubview:lab2];
        [lab2 mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.mas_equalTo(line.mas_bottom).offset(2);
            make.left.mas_equalTo(15);
        }];
        lab2.font =[UIFont systemFontOfSize:12.0f];
        lab2.text =@"钻石可用于购买礼物，兑换现金";
        
        self.currentCharmsLab = [UILabel new];
        [self.contentView addSubview:self.currentCharmsLab];
        [self.currentCharmsLab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.bottom.mas_equalTo(lab1);
            make.left.mas_equalTo(lab1.mas_right).offset(10);
        }];
        self.currentCharmsLab.text= @"0";
        self.currentCharmsLab.font =[UIFont systemFontOfSize:17.0f];
        self.currentCharmsLab.textColor=[UIColor redColor];
        self.noticelab = lab2;
    }
    return self;
}

@end
